﻿export default [
  {
    path: '/crmLogin',
    layout: false, // 是否展示左侧菜单
    component: './crmLogin',
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    path: '/login',
    layout: false,
    component: './login',
  },
  {
    path: '/welcome',
    name: 'welcome',
    icon: 'smile',
    hideInMenu: true,
    component: './Welcome',
  },
  {
    path: '/codeEditor',
    name: 'codeEditor',
    component: './reactHooks/CodeEditor',
  },
  {
    path: '/profile',
    name: 'Profile',
    icon: 'ProfileOutlined',
    routes: [
      { path: '/profile', redirect: '/profile/detail/list' },
      {
        path: '/profile/detail',
        name: 'profile列表',
        routes: [
          { path: '/profile/detail', redirect: '/profile/detail/list' },
          {
            path: '/profile/detail/list',
            name: '券列表',
            hideInMenu: true,
            component: './profile/listBro',
          },
          {
            path: '/profile/detail/add',
            name: '新增券配置',
            hideInMenu: true,
            component: './profile/detail',
          },
          {
            path: '/profile/detail/add/:id',
            name: '新增券配置',
            hideInMenu: true,
            component: './profile/detail',
          },
          {
            path: '/profile/detail/modify/:id',
            name: '编辑券配置',
            hideInMenu: true,
            component: './profile/detail',
          },
          {
            component: './404',
          },
        ],
      },
      {
        path: '/profile/batchManage',
        name: '批次管理',
        component: './profile/batchManage/listBro',
      },
      {
        path: '/profile/sensitizeManage',
        name: '激活管理',
        component: './profile/sensitizeManage/list',
      },
      {
        path: '/profile/sensitizeManage/modify/:id',
        name: '编辑激活管理',
        hideInMenu: true,
        component: './profile/sensitizeManage/detail',
      },
      {
        path: '/profile/batchManage/add',
        name: '新增批次管理',
        hideInMenu: true,
        component: './profile/batchManage/detail',
      },
      {
        path: '/profile/batchManage/add/:id',
        name: '新增批次管理',
        hideInMenu: true,
        component: './profile/batchManage/detail',
      },
      {
        path: '/profile/batchManage/modify/:id',
        name: '编辑批次管理',
        hideInMenu: true,
        component: './profile/batchManage/detail',
      },
      {
        path: '/profile/storegroup',
        name: '餐厅组管理',
        component: './profile/storegroup/list',
      },
      {
        path: '/profile/activitygroup',
        name: '活动组管理',
        component: './profile/activitygroup/list',
      },
      {
        path: '/profile/productkey',
        access: '/profile/productkey',
        name: '键位模版',
        component: './profile/productkey/list',
      },
      {
        path: '/profile/productkey/add',
        name: '新增键位模版',
        hideInMenu: true,
        component: './profile/productkey/detail',
      },
      {
        path: '/profile/productkey/modify/:id',
        name: '编辑键位模版',
        hideInMenu: true,
        component: './profile/productkey/detail',
      },
    ],
  },
  {
    path: '/activity',
    name: 'Activity',
    icon: 'ContainerOutlined',
    routes: [
      {
        path: '/activity/menu',
        name: 'activity列表',
        routes: [
          { path: '/activity/menu', redirect: '/activity/menu/list' },
          {
            path: '/activity/menu/list',
            name: '活动列表',
            hideInMenu: true,
            component: './activity/listBro',
          },
          {
            component: './404',
          },
        ],
      },
      {
        path: '/activity/infocheck',
        name: '核对属性',
        component: './activity/infocheck',
      },
    ],
  },
  {
    path: '/place',
    name: 'Place',
    icon: 'PartitionOutlined',
    routes: [
      {
        path: '/place/subsidy',
        name: '用户补券',
        routes: [
          { path: '/place/subsidy', redirect: '/place/subsidy/list' },
          {
            path: '/place/subsidy/list',
            name: null,
            hideInMenu: true,
            component: './place/subsidy/list',
          },
          {
            component: './404',
          },
        ],
      },
      {
        path: '/place/checkChange/list',
        name: '查券改券',
        component: './place/checkChange/list',
      },
      {
        path: '/place/package/list',
        name: '卡包验证',
        component: './place/package/list',
      },
      {
        path: '/place/batchTicket/list',
        name: '批量发券',
        component: './place/batchTicket/list',
      },
    ],
  },
  {
    path: '/server',
    name: 'Server',
    icon: 'CloudServerOutlined',
    routes: [
      {
        path: '/server/redisConfig',
        name: 'Redis池配置',
        routes: [
          { path: '/server/redisConfig', redirect: '/server/redisConfig/list' },
          {
            path: '/server/redisConfig/list',
            name: null,
            hideInMenu: true,
            component: './server/redisConfig/list',
          },
          {
            path: '/server/redisConfig/modify/:id',
            name: '编辑Redis池配置',
            hideInMenu: true,
            component: './server/redisConfig/detail',
          },
          {
            path: '/server/redisConfig/add',
            name: '新增Redis池配置',
            hideInMenu: true,
            component: './server/redisConfig/detail',
          },
          {
            component: './404',
          },
        ],
      },
      {
        path: '/server/redisSwitch',
        name: 'Redis切换',
        routes: [
          { path: '/server/redisSwitch', redirect: '/server/redisSwitch/list' },
          {
            path: '/server/redisSwitch/list',
            name: null,
            hideInMenu: true,
            component: './server/redisSwitch/list',
          },
          {
            component: './404',
          },
        ],
      },
      {
        path: '/server/refreshTask',
        name: '刷新任务管理',
        component: './server/refreshTask/list',
      },
    ],
  },
  {
    path: '/tool',
    name: '活动拼接',
    icon: 'ToolOutlined',
    routes: [
      {
        path: '/tool/delay',
        name: '活动拼接1',
        component: './tool/delay/list',
      },
      {
        name: '页面编辑',
        // 新页面打开
        target: '_blank',
        layout: false,
        path: '/tool/delay/editor/:type',
        component: './tool/Decoration/editor',
        hideInMenu: true,
      },
    ],
  },
  {
    path: '/operate',
    name: '日历运营',
    icon: 'CalendarOutlined',
    routes: [
      {
        path: '/operate/package',
        name: '日历运营计划',
        routes: [
          { path: '/operate/package', redirect: '/operate/package/list' },
          {
            path: '/operate/package/list',
            name: null,
            hideInMenu: true,
            component: './operate/package/list',
          },
          {
            path: '/operate/package/add',
            name: '新增计划',
            hideInMenu: true,
            component: './operate/package/datail',
          },
          {
            path: '/operate/package/modify/:id',
            name: null,
            hideInMenu: true,
            component: './operate/package/datail',
          },
          {
            path: '/operate/package/read/:id',
            name: null,
            hideInMenu: true,
            component: './operate/package/datail',
          },
          {
            path: '/operate/package/chooseActivty',
            name: null,
            hideInMenu: true,
            component: './operate/package/chooseActivty',
          },

          {
            component: './404',
          },
        ],
      },
      {
        path: '/operate/treeSearch',
        name: '树形控件-2024-02-22',
        component: './treeSearch',
      },
      {
        path: '/operate/reactHooks',
        name: 'React Hooks 系列-2024-02-25',
        component: './reactHooks',
      },
    ],
  },
  {
    component: './404',
  },
];
